import React from "react";
import ReactDOM from "react-dom";
import {Log} from '../utils/CommonUtil';
import {Button} from 'antd-mobile';

//
import {post,get} from '../http/Fetch';
import URL from '../http/URL';


class HttpStu extends React.Component {

  state={
    rows:[],
  }
  
  //在DidMount调用接口：比如商品详情
  //获取是事件调用接口：比如登录按钮，点击之后调用接口
  componentDidMount(){ 

    let params = {
      // companyName: "",
      page: "1",
      rows:'5',
      flag:"1"
    };

    let that = this;

    const result = get(URL.getPsmcheckAppList, params, this,function(data) {
          // this_.props.history.push('/');
          // ToastShow(data.message);
          that.setState({rows:data.rows});
          console.log(that.state.rows);
    }); 
  }

  render() {
    return (
      <div className="index-contain">
        {this.state.rows.map((item,index)=>{
            return <div>
              <span>{item.agencyName}</span>
              <span>{item.checkType}</span>
            </div>
        })}
      </div>)
  }
}
export default HttpStu;
